Skip to content

SANDBOX-800: save CRs when test fails#61582

Merged
openshift-merge-bot[bot] merged 6 commits intoopenshift:masterfrom
rsoaresd:save_crs_when_test_fails
Feb 25, 2025
Merged

SANDBOX-800: save CRs when test fails#61582
openshift-merge-bot[bot] merged 6 commits intoopenshift:masterfrom
rsoaresd:save_crs_when_test_fails

Conversation

@rsoaresd
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd commented Feb 12, 2025

Description

Save CRs when test fails

Issue ticket number and link

SANDBOX-800

@openshift-ci openshift-ci bot requested review from dgoodwin and fbm3307 February 12, 2025 16:56
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2025
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

could not load configuration from candidate revision of release repo: failed to load ci-operator configuration from release repo: invalid ci-operator config: configuration has 4 errors:

 * tests[0].post[0]: only one of `ref`, `chain`, or a literal test step can be set
 * tests[0].post[0]: `from` or `from_image` is required
 * tests[0].post[0]: `commands` is required
 * 'tests[0].post[0].resources' should have at least one request or limit

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

could not load configuration from candidate revision of release repo: failed to load ci-operator configuration from release repo: invalid ci-operator config: configuration has 4 errors:

 * tests[0].test[1]: only one of `ref`, `chain`, or a literal test step can be set
 * tests[0].test[1]: `from` or `from_image` is required
 * tests[0].test[1]: `commands` is required
 * 'tests[0].test[1].resources' should have at least one request or limit

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-codeready-toolchain-host-operator-master-e2e

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rsoaresd rsoaresd force-pushed the save_crs_when_test_fails branch from 4cbe2d4 to a68e5c4 Compare February 13, 2025 17:48
@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rsoaresd rsoaresd changed the title save crs when test fails SANDBOX-800: save crs when test fails Feb 13, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 13, 2025
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Feb 13, 2025

@rsoaresd: This pull request references SANDBOX-800 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rsoaresd rsoaresd changed the title SANDBOX-800: save crs when test fails SANDBOX-800: save CRs when test fails Feb 13, 2025
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Feb 13, 2025

@rsoaresd: This pull request references SANDBOX-800 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

Details

In response to this:

Description

Save CRs when test fails

Issue ticket number and link

SANDBOX-800

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Copy Markdown
Member

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add jrosental to the owners and reviewers too.
There are also some JSONs which don't include jrosental but I'm not sure if those were generated?

- rajivnathan
- ranakan19
- rsoaresd
- xcoulon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- xcoulon
- xcoulon
- jrosental

- rajivnathan
- ranakan19
- rsoaresd
- xcoulon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- xcoulon
- xcoulon
- jrosental

- rajivnathan
- ranakan19
- rsoaresd
- xcoulon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- xcoulon
- xcoulon
- jrosental

- rajivnathan
- ranakan19
- rsoaresd
- xcoulon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- xcoulon
- xcoulon
- jrosental

- rajivnathan
- ranakan19
- rsoaresd
- xcoulon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- xcoulon
- xcoulon
- jrosental

- rajivnathan
- ranakan19
- rsoaresd
- xcoulon
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- xcoulon
- xcoulon
- jrosental

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So sorry! I added it here: 3c984a4

I also added jrosental to the OWNERS of the repos (if not in OWNERS of the repos that runs the e2e jobs - toolchain-e2e, host-operator, member-operator, registration-service and workload-analyzer - his name will be removed in theses. For more info, check this Slack thread):

P.S. I also added him in api and toolchain-common to update there

Copy link
Copy Markdown

@rajivnathan rajivnathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2025
Comment on lines +22 to +44
queue ${ARTIFACT_DIR}/bannedusers.json oc --insecure-skip-tls-verify --request-timeout=5s get bannedusers.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/idlers.json oc --insecure-skip-tls-verify --request-timeout=5s get idlers.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/masteruserrecords.json oc --insecure-skip-tls-verify --request-timeout=5s get masteruserrecords.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/memberoperatorconfigs.json oc --insecure-skip-tls-verify --request-timeout=5s get memberoperatorconfigs.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/memberstatuses.json oc --insecure-skip-tls-verify --request-timeout=5s get memberstatuses.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/notifications.json oc --insecure-skip-tls-verify --request-timeout=5s get notifications.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/nstemplatesets.json oc --insecure-skip-tls-verify --request-timeout=5s get nstemplatesets.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/nstemplatetiers.json oc --insecure-skip-tls-verify --request-timeout=5s get nstemplatetiers.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/proxyplugins.json oc --insecure-skip-tls-verify --request-timeout=5s get proxyplugins.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/socialevents.json oc --insecure-skip-tls-verify --request-timeout=5s get socialevents.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/spacebindings.json oc --insecure-skip-tls-verify --request-timeout=5s get spacebindings.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/spacebindingrequests.json oc --insecure-skip-tls-verify --request-timeout=5s get spacebindingrequests.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/spaceprovisionerconfigs.json oc --insecure-skip-tls-verify --request-timeout=5s get spaceprovisionerconfigs.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/spacerequests.json oc --insecure-skip-tls-verify --request-timeout=5s get spacerequests.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/spaces.json oc --insecure-skip-tls-verify --request-timeout=5s get spaces.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/tiertemplates.json oc --insecure-skip-tls-verify --request-timeout=5s get tiertemplates.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/tiertemplaterevisions.json oc --insecure-skip-tls-verify --request-timeout=5s get tiertemplaterevisions.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/toolchainclusters.json oc --insecure-skip-tls-verify --request-timeout=5s get toolchainclusters.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/toolchainconfigs.json oc --insecure-skip-tls-verify --request-timeout=5s get toolchainconfigs.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/toolchainstatuses.json oc --insecure-skip-tls-verify --request-timeout=5s get toolchainstatuses.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/usersignups.json oc --insecure-skip-tls-verify --request-timeout=5s get usersignups.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/usertiers.json oc --insecure-skip-tls-verify --request-timeout=5s get usertiers.toolchain.dev.openshift.com --all-namespaces -o json
queue ${ARTIFACT_DIR}/workspaces.json oc --insecure-skip-tls-verify --request-timeout=5s get workspaces.toolchain.dev.openshift.com --all-namespaces -o json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we add (or remove) a CRD, then we would need to update this script. I would try to make it more generic - something like this:

CRD_LIST=$(kubectl get crds -o jsonpath='{.items[?(@.spec.group=="toolchain.dev.openshift.com")].metadata.name}')
for CRD in ${CRD_LIST}; do
  queue ${ARTIFACT_DIR}/${CRD}.json oc --insecure-skip-tls-verify --request-timeout=5s get ${CRD} --all-namespaces -o json
done

so it iterates over the available CRDs instead of hard-coding them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!! I agree! Addressed in 2dc90e3

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 14, 2025
@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 14, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 14, 2025
@openshift-ci-robot openshift-ci-robot removed the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 14, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2025
@alexeykazakov
Copy link
Copy Markdown
Member

/retest

@alexeykazakov
Copy link
Copy Markdown
Member

/pj-rehearse auto-ack

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@alexeykazakov: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2025
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@rsoaresd: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-codeready-toolchain-registration-service-master-e2e codeready-toolchain/registration-service presubmit Ci-operator config changed
pull-ci-codeready-toolchain-member-operator-master-e2e codeready-toolchain/member-operator presubmit Ci-operator config changed
pull-ci-codeready-toolchain-host-operator-master-e2e codeready-toolchain/host-operator presubmit Ci-operator config changed
pull-ci-codeready-toolchain-workload-analyzer-master-e2e codeready-toolchain/workload-analyzer presubmit Ci-operator config changed
pull-ci-codeready-toolchain-toolchain-e2e-master-e2e codeready-toolchain/toolchain-e2e presubmit Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

Copy link
Copy Markdown

@ranakan19 ranakan19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Looking forward to being able to see CRs in artifacts

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Feb 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, fbm3307, MatousJobanek, rajivnathan, ranakan19, rsoaresd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rsoaresd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 25, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 1dc6d3d into openshift:master Feb 25, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants